<template>
    <!-- 文字信息 textDialog -->
    <el-dialog
    :append-to-body='true'
    :title="dialogTitle"
    :visible.sync="isshowtextDialogs"
    width="30%"
    :show-close='false'
    :close-on-click-modal='false'
    top='30vh'
    >
    <i class="iconfont closeicon" @click='closepassword'>&#xe6ce;</i>
    <div class="textDialogcontent">
        <slot></slot>
    </div>
    <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="closepassword" size="medium">确 定</el-button>
    </span>
    </el-dialog>
</template>

<script>
export default {
    data(){
        return{

        }
    },
    props:{
        dialogTitle:{
            type:String,
            default:'标题'
        },
        //是否显示弹窗
        isshowtextDialogs:{
            type:Boolean,
            default:false,
            required:true
        },
    },
    methods:{
        //关闭弹窗
        closepassword(){
            this.$emit('closetextDialog')
        }
    }
}
</script>

<style scoped lang='scss'>
.closeicon{
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    font-size: 24px;
    color: hsla(0,0%,40%,.6784313725490196);
    &:hover{
        color: $base-color-default;
    }
}
</style>
